home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / filutil / mulco501.zip / MULTICOL.DOC < prev    next >
Text File  |  1995-01-08  |  33KB  |  663 lines

  1. MULTICOL.DOC
  2. 01/08/95
  3.  
  4. The MULTICOL.EXE program creates multi-columned listings from a text file.
  5. Features:
  6.  
  7.   * You can specify the number of columns and desired page width for the
  8.     multi-column listing
  9.   * The program can provide titles, column headers, and footers for the
  10.     reformatted listing
  11.   * MULTICOL can also add these titles, etc to single-column listings,
  12.     providing some pagination capabilities for regular text
  13.   * Can reformat for display ASCII-delimited, fixed field, and dBase input files
  14.   * Can present totals and subtotals for dBase and ASCII-delimited fields
  15.   * Can reflow text to fit within the specified page widths
  16.   * Can embed printer control characters in the resulting file
  17.   * Can remove (or add) columns within a text document
  18.  
  19.  
  20. NOTE:  THE MULTICOL.EXE PROGRAM STOPS WITH THE JANUARY 1995 (501) VERSION.  IT
  21. IS BEING REPLACED BY A MORE GENERAL PURPOSE PAGINATE PROGRAM.  CHECK FOR
  22. PAGINymm.ZIP.
  23.  
  24. Examples:
  25.  
  26. MULTICOL is an easy way of adding header and footer information to text
  27. documentation.  For my DEMO System documentation, I maintain an initialization
  28. file (MULTIHED.INI)--init files are described below--that includes the following
  29. lines:
  30.  
  31.      ; Is used to create page headings for text documents.
  32.      /COLUMNS=1
  33.      /EJECT
  34.      /LINES=59
  35.      /TITLEC1="^N                   Last revised ^D                     Page ^B"
  36.      /TITLE2=""
  37.      /OVERWRITE
  38.  
  39. Then I create the documentation using the following command:
  40.  
  41.         MULTICOL DEMOSYS.DOC DEMOSYS.REF /IMULTIHED.INI
  42.  
  43. The "^N" parameter in the title is replaced with the file name, "^D" is replaced
  44. with today's date, and "^B" is replaced with the page number.  Notice I'm not
  45. creating a multi-column output here and am not reformatting the original text at
  46. all except to add headers and footers.
  47.  
  48.  
  49. As another example, I frequently need a sorted multi-column directory listing.
  50. DIR /ON /W is fine in DOS but I prefer to see the filenames listed
  51. alphabetically down the page, not across it.  So I maintain an initilization
  52. file (in C:\DIRW.INI) for my Epson printer that contains these lines:
  53.  
  54.      ; Is used for multicolumn DIR listings.
  55.      /COLUMNS=7
  56.      /OVERWRITE
  57.      /WIDTH=132
  58.      ; This is the setup string used to set a Epson to compressed mode.
  59.      /SETUP="\015"
  60.      ; Don't want to leave the printer in that mode when you leave.
  61.      /RESET="\018"
  62.  
  63. Then I create the listing using the following commands:
  64.  
  65.         DIR /ON > TEMP.TXT
  66.         MULTICOL TEMP.TXT TEMP.NEW /IC:\DIRW.INI
  67.  
  68.  
  69. A similar example of the above (multicolumn DIR listings) creates a multicolumn
  70. listing with just the file name and creation date.  This requires creating a
  71. field-definition file (called, say, C:\DIRW.DEF) roughly like the following:
  72.  
  73.      c 12 0 12 File Name
  74.      c 11 0 0  File Size
  75.      c 8 0 8   Updated
  76.      /+=-
  77.      /-=.
  78.      /-=Serial
  79.  
  80. Note that this definition file will provide the string "File Name" as the column
  81. header for the first column of data, skip the second (file size), provide
  82. "Updated" for the date, and then skip the rest of the DIR output.  It will also
  83. skip any lines in the directory that don't include a dash ("-") but drop the
  84. records containing "." or "Serial", both of which appear in the heading
  85. information.  Once the definition file is provided, you can create a
  86. three-column listing with the following commands.  (You could make it have more
  87. columns if you wanted to specify compressed options; see the prior example)
  88.  
  89.         DIR /ON > TEMP.TXT
  90.         MULTICOL TEMP.TXT TEMP.NEW /INDEF=C:\DIRW.DEF /COLUMNS=3
  91.  
  92. A sample of what a portion of the output file (TEMP.NEW) might look like:
  93.  
  94.                                      Page 1
  95.                          |                          |
  96. File Name     Updated    | File Name     Updated    | File Name     Updated
  97.                          |                          |
  98. AV       BAS  01-08-94   | DEMOMAKE DOC  01-08-94   | FIXTEXT  DIZ  01-07-94
  99. AV       DIZ  03-22-93   | DEMOMAKE EXE  01-30-94   | FIXTEXT  DOC  01-26-94
  100. AV       DOC  01-08-94   | DEMOMAKE REF  01-08-94   | FIXTEXT  EXE  01-30-94
  101.  
  102.  
  103. Specifying parameters:
  104.  
  105. Parameters for this program can be set in the following ways.  The last setting
  106. encountered always wins:
  107.   - Read from an *.INI file (see below),
  108.   - Through the use of an environmental variable (SET MULTICOL=whatever), or
  109.   - From the command line (see "Syntax" below)
  110.  
  111.  
  112. The MULTICOL.INI file:
  113.  
  114. MULTICOL will read a MULTICOL.INI file if one is found.  (You can specify a
  115. different file name if desired.) The file is an ASCII text file that can be
  116. created maintained by hand.  The file can consist or one or more command line
  117. parameters (only those that begin with a "/"; no multi-word ones), one statement
  118. per line.
  119.  
  120. The file can also contain comments which are blank lines or any line beginning
  121. with:
  122.         ;    (semi-colon)
  123.         :    (colon)
  124.         '    (quote)
  125.  
  126. MULTICOL looks for the initialization file in your default subdirectory first.
  127. It then searches for it in the subdirectory where the executable was and then
  128. goes through your DOS path.
  129.  
  130. Passing in "/-I" or "/INULL" skips loading the INI file.  This saves some
  131. execution time as the program does not need to search your path for the file.
  132.  
  133.  
  134.  
  135. Field-definition file:
  136.  
  137. NOTE:  THE FOLLOWING DISCUSSION DOES NOT APPLY TO BASIC TEXT FILES.  IF YOU JUST
  138. WANT TO ADD HEADERS AND SUCH TO STANDARD TEXT STUFF, SKIP THIS SECTION.  IT IS
  139. APPLICABLE ONLY FOR FIELDED DATA FILES.
  140.  
  141. For data files (ASCII-delimited, dBase, and fixed field input files), you can
  142. use MULTICOL to present a reasonably formatted listing of variables.  Unless you
  143. are reading a dBase file, this program requires a field-definition file to
  144. figure out the characteristics for each field and also to set certain file
  145. characteristics.  If you're processing an ASCII-delimited input file, the
  146. routine can try to create a field-definition file for you if desired.
  147.  
  148. The definition file can be created with any text editor.  The definition file
  149. consists of several records with the following fields separated by spaces.
  150. Except for the record type indicator (which must begin in column 1), all other
  151. fields can be placed in any columns:
  152.  
  153.         (1) record type (see below)
  154.         (2) length of field on input
  155.         (3) number of decimal places for numeric data (if you don't know,
  156.             put a "?" here; for non-numeric data, a "0" is fine) on output
  157.         (4) length of field on output
  158.  
  159. Any characters after the field length are treated as comment fields.  You would
  160. typically use this to enter the field name or column position or any other
  161. information of use to you.
  162.  
  163. The data record types accepted by this routine are as follows:
  164.  
  165.         type C = character data
  166.              N = numeric
  167.              L = logical (T or F)
  168.              D = date (in yyyymmdd format)
  169.  
  170. The data fields should be in the order the fields are found in the source file.
  171.  
  172. You may also specify up to 10 include filters and up to 10 exclude filters in
  173. the field-definition file.  If an include filter is specified, the input record
  174. must contain at least one of the specified character strings in order to be
  175. processed.  If an exclude filter is specified, any input record which contains
  176. any of the specified character strings will be ignored.  Filters are case
  177. sensitive (capitalization matters) and processed as "or" items (if any filter is
  178. met, the condition is met; filters are not combined to determine fulfillment).
  179. The filters are specified in the field-definition file in the following ways:
  180.  
  181.         /+=string     include filter, the string "string" can appear anywhere
  182.         /S+=string    include filter, the string "string" is at the beginning
  183.                       of the record
  184.         /+S=string    include filter, the string "string" is at the end of the
  185.                       record
  186.         /-=string     exclude filter, the string "string" can appear anywhere
  187.         /S-=string    exclude filter, the string "string" is at the beginning
  188.                       of the record
  189.         /-S=string    exclude filter, the string "string" is at the end of the
  190.                       record
  191.  
  192.  
  193. For example, if you want to specify in your control file that you only want
  194. records that contain either "Japan" or "France" *and* you want to exclude any
  195. records that begin with an underscore character, you would need to include the
  196. following three filter statements:
  197.  
  198.         /+=Japan
  199.         /+=France
  200.         /S-=_
  201.  
  202. The character string can include hexadecimal codes (in the &Hxx format) or
  203. decimal codes (in the \ddd format) if necessary.
  204.  
  205. Note that for fixed field files, you have to account for every byte in the file.
  206. If you have something like this:
  207.  
  208.         12345678_1_2345678_2_2345678_3      (column positions)
  209.         APPLE    X Y    12 BANANAS
  210.  
  211. Even though you may think you only have five fields, the following .DEF file
  212. will NOT work:
  213.  
  214.         ; Bad .DEF file:  Note does not account for blank spaces
  215.         C   8 0   8 Fruit1
  216.         C   1 0   1 Class1
  217.         C   1 0   1 Class2
  218.         N   5 0   5 Value
  219.         C  11 0  11 Fruit2
  220.  
  221. You may want the Fruit1 field to be in columns 1 through 8 and Class1 to be in
  222. column 10 but the routine will not know to skip column 9 so it will start
  223. reading Class1 beginning in column 9, Class2 beginning in column 10, etc.  To
  224. drop the blank positions, you have to add dummy fields on input and ask for them
  225. to be dropped on output:
  226.  
  227.         ; Good .DEF file:  Spaces between fields are accounted for
  228.         C   8 0   8 Fruit1
  229.         C   1 0   0 Filler
  230.         C   1 0   1 Class1
  231.         C   1 0   0 Filler
  232.         C   1 0   1 Class2
  233.         C   1 0   0 Filler
  234.         N   5 0   5 Value
  235.         C   1 0   0 Filler
  236.         C  11 0  11 Fruit2
  237.  
  238. You can also use the input field length and output field lengths to either drop
  239. fields using other formats (by specifying a zero length for the output field
  240. length) or for creating fields on output (by specifying a zero length for the
  241. input field length).  You can also use this to expand on contract a field.  For
  242. example, if Fruit1 is 8 characters long but you only want it to occupy 4
  243. characters on output (thus the field would be truncated), specify 8 for the
  244. input field length and 4 for the output field length.
  245.  
  246. For dBase files, a deffile will automatically be created for you unless you
  247. specify /-OUTDEF.  In that case, the routine will read the deffile and act
  248. appropriately.  This is necessary if you want fields expanded or ignored.
  249.  
  250.  
  251. You can also use the /PRINT specification to select which fields you want
  252. printed.
  253.  
  254. For adding headers and footers to regular text files, make sure you specify
  255. /COLUMNS=1.  The system starts a new page when it runs into lines with page
  256. eject characters or when it hits the number of lines specified in the /LINES=n
  257. parameter.  (The page eject part is only true if /-WRAP is in effect.)
  258.  
  259.  
  260. Syntax:
  261.  
  262.     MULTICOL infile outfile [ /OVERWRITE | /-OVERWRITE | /OVERASK ]
  263.       [ /DELIM="string" ] [ /LINES=n ] [ /WIDTH=n ] [ /EJECT | /-EJECT ]
  264.       [ /COLUMNS=n ] [ /-WRAP | /WRAP [ /INDENT=n ] | /REFLOW ]
  265.       [ /Iinitfile | /-I ] [ /SETUP="string" ] [ /RESET="string" ]
  266.       [ /{ TITLE | HEADER | FOOTER }[ R | C | L ][ 1 to 5]="text" ]
  267.       [ /{ TITLE | HEADER | FOOTER }{ T | B }="string" ]
  268.       [ /-TITLE ] [ /FROM FIXED | /FROM ASCII | /FROM DBF ] [ /DELETED ]
  269.       [ /INDEF=deffile | /-INDEF ] [ /OUTDEF=deffile | /-OUTDEF ]
  270.       [ /DELIMS=aroundstrings,aroundnums,betweenfields ] [ /BEEP | /-BEEP ]
  271.       [ /SKIP | /MISSING | /ABORT ] [ /GAP=n ] [ /BLANKS | /-BLANKS ] [ /TALLY ]
  272.       [ /INMISS=val ] [ /INMISSC=val ] [ /OUTMISS=val ] [ /OUTMISSC=val ]
  273.       [ /SUM={ col_spec | var_spec } ] [ /BREAK={ col_spec | var_spec } ]
  274.       [ /PRINT={ col_spec | var_spec } ] [ /? | /?&H ]
  275.  
  276. where:
  277.  
  278. "infile" is the name of the ASCII text file that you want reformatted into a
  279. multicolumn file.
  280.  
  281. "outfile" is the name of the ASCII text file that you want to create.  "infile"
  282. and "outfile" cannot be the same.  While "outfile" is typically a file name, you
  283. can specify devices like "PRN:" or "SCRN:" if you want to.
  284.  
  285. "/OVERWRITE" says to write over the outfile if it already exists.
  286.  
  287. "/-OVERWRITE" says to abort if the outfile exists already.
  288.  
  289. "/OVERASK" says to prompt if the outfile exists already.  Initially the default.
  290.  
  291. "/DELIM="string"" indicates the character string that should be used to separate
  292. columns.  Note that the string itself must appear within quotation marks.  By
  293. default, the string is " | ".
  294.  
  295. "/LINES=n" indicates how many physical lines can fit on your printed page.  This
  296. setting is used for determining where headers, footers, page eject characters
  297. (with /EJECT option), and number of lines per column for multi-column output.
  298. (It's not used in cases where you're using /COLUMNS=1, none of the other stuff,
  299. and you've specified /-TITLE to turn off the default title line.)  You
  300. can also set it to /LINES=0 to turn off page breaks; only the first
  301. title (if any) will print in that case.  Defaults to /LINES=60.
  302.  
  303. "/WIDTH=n" indicates how many physical characters can fit on your printed page.
  304. Defaults to /WIDTH=80.  Typically, if you are in compressed mode, the value is
  305. /WIDTH=132.
  306.  
  307.  
  308. "/EJECT" says to add a page eject after the maximum lines-per-page (/LINES=n)
  309. setting.  This is not recommended if you're using a printer with a defined page
  310. size that is the the same or smaller than the /LINES=n setting.  If you're using
  311. something like a LaserJet, setting /EJECT will typically result in blank pages
  312. being generated after each full page.  The default is "/-EJECT".
  313.  
  314. "/-EJECT" is the opposite of "/EJECT".  This is the default.
  315.  
  316. "/COLUMNS=n" indicates how many text columns you want to appear.  The value can
  317. be as low as one (useful if you're just doing reformatting of paragraphs).
  318. There's no maximum value but anything above 7 or so starts looking worthless.
  319. The default value is /COLUMNS=2.
  320.  
  321. The combination of the /COLUMNS=n, /DELIM="string", and /WIDTH=n tells the
  322. program how wide each physical column is.  For example, using the defaults of
  323. /COLUMNS=2, /DELIM=" | ", and /WIDTH=80, each text column is a maximum of 38
  324. characters.  (Width - (Size of Delimiter * (Number of columns - 1), all divided
  325. by 2.  INT((80-(3*1))/2) is 38.) The routine tells you what column size it
  326. picked; if you don't like the result, adjust some of your other parameters and
  327. try it again.
  328.  
  329. "/-WRAP", "/WRAP", and "/REFLOW" tells the program what you want it to do with
  330. text that exceeds the width of each physical column.  The default is /-WRAP.
  331. Each is explained separately below:
  332.  
  333. "/-WRAP" indicates that long lines are to be truncated and the excess characters
  334. are lost.  This is the default.
  335.  
  336. "/WRAP" says the line is to be parsed into words and any word(s) that doesn't
  337. fit on the original line spills over on successive line(s).  The spillover lines
  338. are indented by the value of "/INDENT=n".  By default, the secondary lines are
  339. indented by 2 spaces ("/INDENT=2").
  340.  
  341. "/INDENT=n"--see /WRAP above.
  342.  
  343. "/REFLOW" is the most sophisticated of the options.  /REFLOW will treat most of
  344. the text as paragraphs are readjust the length of the entire paragraph.  The
  345. reflowing stops whenever a new paragraph is detected.  The routine considers a
  346. new paragraph to start whenever the succeeding line is either blank or it starts
  347. with a space.  Unlike with the other options, you can actually end up with fewer
  348. lines in your output file than you had in your input file using /REFLOW.  This
  349. only happens of course if the source lines were generally shorter than the
  350. computer text column width.
  351.  
  352. "/Iinitfile" says to read an initialization file with the file name "initfile".
  353. The file specification *must* contain a period.  If no drive or path information
  354. is specified, the program will search for initfile beginning in your default
  355. subdirectory and then going throughout your DOS path.  The use of an
  356. initialization file is optional.  Initially defaults to "/IMULTICOL.INI".
  357.  
  358. "/-I" (or "/INULL") says to skip loading the initialization file.
  359.  
  360.  
  361. "/SETUP="string"" specifies the initialization string to put at the beginning of
  362. the file.  This is typically used to make sure your printer has the proper
  363. orientation (landscape vs portrait), characters per inch (cpi), and lines per
  364. inch (lpi) settings before printing.  The setup string itself must appear in
  365. quotation marks.  Use "\027" for the Escape character and any other ASCII code
  366. can be entered with "\" followed by its 3-digit value (e.g.  "\032" is a space).
  367. You can also use hexadecimal values as &Hxx.  See the character table at the end
  368. of this documentation.  You have to know your own setup strings.  Borland's
  369. documentation provides some very useful tables for this sort of thing (use "\"
  370. instead of "/" though).  For an HP LaserJet, the setups I use all of the time
  371. are:
  372.  
  373.         Orientation     PageLen RMargin String
  374.  
  375.         Portrait        60      80      \027E
  376.         Portrait        60      132     \027(s16.66H
  377.         Landscape       45      106     \027&l10
  378.         Landscape       45      176     \027&l10\027(s16.66H
  379.         Landscape       66      106     \027&l1o5.45C
  380.         Landscape       66      176     \027&l1o5.45C\027(s16.66H
  381.  
  382. "/RESET="string"" specifies the string to send after your file is done.  This
  383. typically resets the printer to its system default setting so you won't get
  384. stuck in landscape mode forever.  The setup string itself must appear in
  385. quotation marks.  Use "\027" for the Escape character.  For an HP LaserJet, the
  386. following resets the printer to its factory settings:
  387.  
  388.         \027E
  389.  
  390. "/{ TITLE | HEADER | FOOTER } [ R | C | L ] [ 1 to 5 ]="text"" allows you to
  391. specify up to 5 lines each for the report's TITLE (at the top of each page),
  392. HEADER (at the top of each column), and FOOTER (at the bottom of each page).
  393. You can specify positioning as well:
  394.  
  395.         R = right-justify the text
  396.         C = center the text (this is the default for /TITLE and /HEADER)
  397.         L = left-justify the text (this is the default for /FOOTER)
  398.  
  399. If no line number is specified, line 1 is presumed.  If a line number is
  400. specified, all lines before that number are presumed to contain something and
  401. will be blank filled if you don't provide anything.  If, for example, you
  402. specify "/TITLER3="Hi!"", without specifying any other titles, then you'll get
  403. blank lines for /TITLE1 and /TITLE2, but you won't get any /TITLE4 or /TITLE5.
  404.  
  405. The text itself can contain one of six embedded string-replacement codes:
  406.  
  407.         ^B will be replaced by the page number
  408.         ^D will be replaced by today's date (in mm/dd/yy form)
  409.         ^T will be replaced by today's time (in hh:mm form)
  410.         ^N will be replaced by the input file's name
  411.         ^A will be replaced by the input file's creation date (mm/dd/yy form)
  412.         ^I will be replaced by the input file's creation time (hh:mm form)
  413.  
  414. The only title, header, or footer provided by default is /TITLE1="Page ^B".  If
  415. you don't want to replace the title with something else, the only way to turn it
  416. off entirely is to use the /-TITLE option (below).
  417.  
  418.  
  419. "/{TITLE | HEADER | FOOTER }{ T | B }="string"" allows you to specify a
  420. repeating string to be placed either on top of or on the bottom of your titles,
  421. headers, and footers.  The string, typically consisting of just a few
  422. characters, is repeated by the routine until it fills up the available space.
  423. For example, "/TITLET=" -"" would add the following line at the top of the
  424. report:
  425.  
  426.  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  427.  
  428. This option is typically used to (a) insure that there are blank lines before
  429. footer lines and (b) to have demarcations between sections.
  430.  
  431. "/-TITLE" says to turn off all titles including the default one (/TITLE="Page
  432. ^B").  Note that any /TITLE specifications used after /-TITLE will still appear.
  433.  
  434. "/FROM FIXED" says that the input file is a fixed field file.  Any file can be
  435. fixed field:  a page of text is typically a fixed field of 80 characters.  All
  436. standard text files are fixed-field.  The default for MULTICOL is /FROM FIXED.
  437. Note that if you want, you can specify a field-definition file for fixed field
  438. files.  See the examples given in the beginning.
  439.  
  440. "/FROM ASCII" says that the input file is ASCII-delimited (typically with quotes
  441. around strings and commas between fields--MULTICOL treats the quotes as
  442. optional).  Typically, the routine expects an input field-definition file
  443. (/INDEF=deffile) to be specified with the definition of fields.  The routine
  444. will determine a field-definition file for you if the /-INDEF parameter is
  445. specified.
  446.  
  447. "/FROM DBF" specifies that the input file is a dBase file.  If the file
  448. extension is .DBF, the routine will presume this.  The routine uses dBase's
  449. default field lengths unless /-INDEF is specified.
  450.  
  451. "/DELETED" applies for dBase input files only.  It says you want to retain
  452. deleted records.  Otherwise, they're dropped in the output file.
  453.  
  454. "/INDEF=deffile" provides the name of the field-definition file to be read by
  455. the program.  If no deffile is specifically provided and you're using FROM
  456. ASCII, the routine will presume the field-definition file exists and is named
  457. the same thing as the infile but it has the extension of ".DEF".  A deffile has
  458. to be specifically provided for FROM FIXED files if one is desired.
  459.  
  460. "/-INDEF" says there is no field-definition file.  This is the default if you're
  461. using FROM DBF or FROM FIXED.
  462.  
  463. "/OUTDEF=deffile" provides the name of the output file that you want the program
  464. to write the field-definition file to.  This is useful in cases where you did
  465. *not* use a field-definition file on input since it allows you to see and
  466. possibly modify the field-definition file for next time.  If no deffile is
  467. provided and you're using FROM DBF, the routine will presume the
  468. field-definition file is named the same thing as the infile but it has an
  469. extension of ".DEF".
  470.  
  471. "/-OUTDEF" says to skip the creation of the field-definition file.  This is the
  472. default for ASCII-delimited and fixed-field files.
  473.  
  474.  
  475. "/DELIMS=aroundstrings,aroundnums,betweenfields" allows you to specify the
  476. delimiters (in sequence) around string fields, around numeric fields, and
  477. between fields.  Defaults to:
  478.  
  479.         /DELIMS=",,,
  480.  
  481. (Use quotes around character strings, nothing around numeric data, and the third
  482. comma indicates that there is a comma between fields.) The replacement string
  483. can include hexadecimal codes (in the &Hxx format) or decimal codes (in the \ddd
  484. format) if necessary so either of the following would put a tab between fields:
  485.  
  486.         /DELIMS=",,&H09
  487.         /DELIMS=",,\009
  488.  
  489. See the table of hexadecimal and decimal codes at the end of this documentation.
  490.  
  491. "/BEEP" beeps when the program is finished.
  492.  
  493. "/-BEEP" reverses /BEEP.  Initially the default.
  494.  
  495. "/SKIP" says to skip ASCII-delimited records with bad data values; otherwise the
  496. routine aborts when it runs into any.  /SKIP, /MISSING, and /ABORT are mutually
  497. exclusive.
  498.  
  499. "/MISSING" says to presume any missing fields in an ASCII-delimited record
  500. should be filled in with blanks (for character fields) and 0 for numeric fields.
  501. Incomplete records are written out (unlike in /SKIP).  /SKIP, /MISSING, and
  502. /ABORT are mutually exclusive.
  503.  
  504. "/ABORT" says to abort when you run into bad records.  Initially the default.
  505. /SKIP, /MISSING, and /ABORT are mutually exclusive.
  506.  
  507. "/GAP=n" is used when printing ASCII-delimited or dBase files.  It tells the
  508. program how many spaces to print between each variable.  The default is /GAP=2.
  509.  
  510. "/BLANKS" says to retain any blank lines found in the input file when writing
  511. out the file.  This is initially the default.
  512.  
  513. "/-BLANKS" removes the blank lines.
  514.  
  515. "/TALLY" says to present a count of items.  If a /BREAK specification is
  516. provided, there will be a tally for each break as well as for the grand total.
  517.  
  518. "/INMISS=val" specifies that any numeric value that has the character string
  519. representation of "val" will be considered missing.  Note that this is an exact
  520. character string comparison so /INMISS=1 will not compare to a value of "1.00".
  521. Defaults to /INMISS=NULL (which translates as spaces).
  522.  
  523. "/INMISSC=val" specifies that any character string value that has the value of
  524. "val" will be considered missing.  Defaults to /INMISSC=NULL (which translates
  525. as spaces).
  526.  
  527.  
  528. "/OUTMISS=val" specifies that any missing numeric input value will be translated
  529. on output as "val".  For example, "/OUTMISS=N.A." would fill in "N.A." for each
  530. missing value.  Defaults to /OUTMISS=NULL (which translates as spaces).
  531.  
  532. "/OUTMISSC=val" specifies that any missing character input value will be
  533. translated on output as "val".  Defaults to /OUTMISSC=NULL (which translates as
  534. spaces).
  535.  
  536. "/SUM={ col_spec | var_spec }" says to summarize (add) all values in particular
  537. columns.  If ASCII-delimited or dBase input is used, you can specify variables
  538. to be added.  If a /BREAK specification is provided, there will be subtotals at
  539. each break as well as grand total.
  540.  
  541. The "col_spec | var_spec" portion expands to "{ Cx[-x] | Vx[-x] } [, {Cx[-x] |
  542. Vx[-x] } ]..." where "x" is the column or variable number, "-" indicates a
  543. range, and "C" means column whereas "V" means variable.  If you have an
  544. ASCII-delimited file and you want the values of the first three variables
  545. summarized, you'd say "/SUM=C1-3".  If you want variables 2, and 4 through 6
  546. summarized, you'd say "/SUM=C2,C4-6".  If you want the values in columns 10
  547. through 20 summarized, you'd say "/SUM=C10-20".  Note that for column
  548. specifications, you have to request the output columns, not input columns.
  549.  
  550. "/BREAK={ col_spec | var_spec }" says to present tally, total, or blank lines
  551. based on the values in certain columns or variables.  For example, if you had an
  552. alphabetical listing and you wanted to, you could break up the listing by the
  553. first letter of the last name.  A break is generated whenever there is a change
  554. in any character in the column or variable range specified.  The
  555. "col_spec | var_spec" specification is identical to the /SUM specification.
  556.  
  557. "/PRINT={ col_spec | var_spec }" says to print only some of the fields.  For
  558. example, if you have a dBase file with 10 variables and you only want some of
  559. them to print out, you can say "/PRINT=V1-3,V6,V8" or something like that.  Note
  560. that the /PRINT specification works in conjunction with any 0-length output
  561. specifications in the deffile.
  562.  
  563. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  564.  
  565. "/?&H" gives you a hexadecimal and decimal conversion table.
  566.  
  567.  
  568.  
  569. Return codes:
  570.  
  571. MULTICOL returns the following ERRORLEVEL codes:
  572.         0 = no problems
  573.       254 = problems with format of file
  574.       255 = syntax problems, or /? requested
  575.  
  576.  
  577. Author:
  578.  
  579. This program was written by Bruce Guthrie of Wayne Software.  It is free for use
  580. and redistribution provided relevant documentation is kept with the program, no
  581. changes are made to the program or documentation, and it is not bundled with
  582. commercial programs or charged for separately.  People who need to bundle it in
  583. for-sale packages must pay a $50 registration fee to "Wayne Software" at the
  584. following address.
  585.  
  586. Additional information about this and other Wayne Software programs can be found
  587. in the file BRUCEymm.DOC which should be included in the original ZIP file.
  588. ("ymm" is replaced by the last digit of the year and the two digit month of the
  589. release.  BRUCE312.DOC came out in December 1993.  This same naming convention
  590. is used in naming the ZIP file that this program was included in.) Comments and
  591. suggestions can also be sent to:
  592.  
  593.                 Bruce Guthrie
  594.                 Wayne Software
  595.                 113 Sheffield St.
  596.                 Silver Spring, MD 20910
  597.  
  598.                 fax: (301) 588-8986
  599.  
  600. See BRUCEymm.DOC file for additional contact information.
  601.  
  602. Foreign users:  Please provide an Internet e-mail address in all correspondence.
  603.  
  604.  
  605. Decimal and hexadecimal codes:
  606.   e.g. "\066\097\116" and "&H426174" both are "Bat"
  607. +---------------------------------------------------------------------------
  608. | dec  hex chr | dec  hex chr | dec  hex chr | dec  hex chr | dec  hex chr |
  609. +--------------+--------------+--------------+--------------+--------------+
  610. | \000 &H00 nul| \052 &H34 4  | \104 &H68 h  | \156 &H9C £  | \208 &HD0 ╨  |
  611. | \001 &H01   | \053 &H35 5  | \105 &H69 i  | \157 &H9D ¥  | \209 &HD1 ╤  |
  612. | \002 &H02   | \054 &H36 6  | \106 &H6A j  | \158 &H9E ₧  | \210 &HD2 ╥  |
  613. | \003 &H03   | \055 &H37 7  | \107 &H6B k  | \159 &H9F ƒ  | \211 &HD3 ╙  |
  614. | \004 &H04   | \056 &H38 8  | \108 &H6C l  | \160 &HA0 á  | \212 &HD4 ╘  |
  615. | \005 &H05   | \057 &H39 9  | \109 &H6D m  | \161 &HA1 í  | \213 &HD5 ╒  |
  616. | \006 &H06   | \058 &H3A :  | \110 &H6E n  | \162 &HA2 ó  | \214 &HD6 ╓  |
  617. | \007 &H07 bel| \059 &H3B ;  | \111 &H6F o  | \163 &HA3 ú  | \215 &HD7 ╫  |
  618. | \008 &H08 bs | \060 &H3C <  | \112 &H70 p  | \164 &HA4 ñ  | \216 &HD8 ╪  |
  619. | \009 &H09 tab| \061 &H3D =  | \113 &H71 q  | \165 &HA5 Ñ  | \217 &HD9 ┘  |
  620. | \010 &H0A lf | \062 &H3E >  | \114 &H72 r  | \166 &HA6 ª  | \218 &HDA ┌  |
  621. | \011 &H0B vt | \063 &H3F ?  | \115 &H73 s  | \167 &HA7 º  | \219 &HDB █  |
  622. | \012 &H0C pg | \064 &H40 @  | \116 &H74 t  | \168 &HA8 ¿  | \220 &HDC ▄  |
  623. | \013 &H0D cr | \065 &H41 A  | \117 &H75 u  | \169 &HA9 ⌐  | \221 &HDD ▌  |
  624. | \014 &H0E   | \066 &H42 B  | \118 &H76 v  | \170 &HAA ¬  | \222 &HDE ▐  |
  625. | \015 &H0F   | \067 &H43 C  | \119 &H77 w  | \171 &HAB ½  | \223 &HDF ▀  |
  626. | \016 &H10   | \068 &H44 D  | \120 &H78 x  | \172 &HAC ¼  | \224 &HE0 α  |
  627. | \017 &H11   | \069 &H45 E  | \121 &H79 y  | \173 &HAD ¡  | \225 &HE1 ß  |
  628. | \018 &H12   | \070 &H46 F  | \122 &H7A z  | \174 &HAE «  | \226 &HE2 Γ  |
  629. | \019 &H13   | \071 &H47 G  | \123 &H7B {  | \175 &HAF »  | \227 &HE3 π  |
  630. | \020 &H14   | \072 &H48 H  | \124 &H7C |  | \176 &HB0 ░  | \228 &HE4 Σ  |
  631. | \021 &H15   | \073 &H49 I  | \125 &H7D }  | \177 &HB1 ▒  | \229 &HE5 σ  |
  632. | \022 &H16   | \074 &H4A J  | \126 &H7E ~  | \178 &HB2 ▓  | \230 &HE6 µ  |
  633. | \023 &H17   | \075 &H4B K  | \127 &H7F   | \179 &HB3 │  | \231 &HE7 τ  |
  634. | \024 &H18   | \076 &H4C L  | \128 &H80 Ç  | \180 &HB4 ┤  | \232 &HE8 Φ  |
  635. | \025 &H19   | \077 &H4D M  | \129 &H81 ü  | \181 &HB5 ╡  | \233 &HE9 Θ  |
  636. | \026 &H1A eof| \078 &H4E N  | \130 &H82 é  | \182 &HB6 ╢  | \234 &HEA Ω  |
  637. | \027 &H1B esc| \079 &H4F O  | \131 &H83 â  | \183 &HB7 ╖  | \235 &HEB δ  |
  638. | \028 &H1C   | \080 &H50 P  | \132 &H84 ä  | \184 &HB8 ╕  | \236 &HEC ∞  |
  639. | \029 &H1D ???| \081 &H51 Q  | \133 &H85 à  | \185 &HB9 ╣  | \237 &HED φ  |
  640. | \030 &H1E ???| \082 &H52 R  | \134 &H86 å  | \186 &HBA ║  | \238 &HEE ε  |
  641. | \031 &H1F ???| \083 &H53 S  | \135 &H87 ç  | \187 &HBB ╗  | \239 &HEF ∩  |
  642. | \032 &H20    | \084 &H54 T  | \136 &H88 ê  | \188 &HBC ╝  | \240 &HF0 ≡  |
  643. | \033 &H21 !  | \085 &H55 U  | \137 &H89 ë  | \189 &HBD ╜  | \241 &HF1 ±  |
  644. | \034 &H22 "  | \086 &H56 V  | \138 &H8A è  | \190 &HBE ╛  | \242 &HF2 ≥  |
  645. | \035 &H23 #  | \087 &H57 W  | \139 &H8B ï  | \191 &HBF ┐  | \243 &HF3 ≤  |
  646. | \036 &H24 $  | \088 &H58 X  | \140 &H8C î  | \192 &HC0 └  | \244 &HF4 ⌠  |
  647. | \037 &H25 %  | \089 &H59 Y  | \141 &H8D ì  | \193 &HC1 ┴  | \245 &HF5 ⌡  |
  648. | \038 &H26 &  | \090 &H5A Z  | \142 &H8E Ä  | \194 &HC2 ┬  | \246 &HF6 ÷  |
  649. | \039 &H27 '  | \091 &H5B [  | \143 &H8F Å  | \195 &HC3 ├  | \247 &HF7 ≈  |
  650. | \040 &H28 (  | \092 &H5C \  | \144 &H90 É  | \196 &HC4 ─  | \248 &HF8 °  |
  651. | \041 &H29 )  | \093 &H5D ]  | \145 &H91 æ  | \197 &HC5 ┼  | \249 &HF9 ∙  |
  652. | \042 &H2A *  | \094 &H5E ^  | \146 &H92 Æ  | \198 &HC6 ╞  | \250 &HFA ·  |
  653. | \043 &H2B +  | \095 &H5F _  | \147 &H93 ô  | \199 &HC7 ╟  | \251 &HFB √  |
  654. | \044 &H2C ,  | \096 &H60 `  | \148 &H94 ö  | \200 &HC8 ╚  | \252 &HFC ⁿ  |
  655. | \045 &H2D -  | \097 &H61 a  | \149 &H95 ò  | \201 &HC9 ╔  | \253 &HFD ²  |
  656. | \046 &H2E .  | \098 &H62 b  | \150 &H96 û  | \202 &HCA ╩  | \254 &HFE ■  |
  657. | \047 &H2F /  | \099 &H63 c  | \151 &H97 ù  | \203 &HCB ╦  | \255 &HFF    |
  658. | \048 &H30 0  | \100 &H64 d  | \152 &H98 ÿ  | \204 &HCC ╠  |              |
  659. | \049 &H31 1  | \101 &H65 e  | \153 &H99 Ö  | \205 &HCD ═  |              |
  660. | \050 &H32 2  | \102 &H66 f  | \154 &H9A Ü  | \206 &HCE ╬  |              |
  661. | \051 &H33 3  | \103 &H67 g  | \155 &H9B ¢  | \207 &HCF ╧  |              |
  662. +--------------+--------------+--------------+--------------+--------------+
  663.